<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<!-- 数组去重 -->
		<script type="text/javascript">
			// 第一种方法
			let r = [0,0,0,0,1,2,3,0,5,6,7,8,0]
			let n = []
			r.forEach(k=> {
				n.indexOf(k) == -1 ? n.push(k):'没有'
			})
			console.log(n)
			// 第二种方法
			let arr3 = [1,8,9,4,5,1,2,3,8,9,10]
			let newArr = arr3.filter((g,h,j) =>{
			    return j.indexOf(g) === h;
			})
			console.log(newArr)
			// 第三种方法
			let  arr = [1,2,123,3,5,45,1,2,5]
			     arr = [...new Set(arr)]
			console.log(arr) 
		</script>
	</body>
</html>
